import request from '@/utils/request'
// 获取部门列表
export const getDeptList = () => request({
  method: 'get',
  url: '/company/department'
})

// 新增部门
export const addDept = data =>
  request({ method: 'post', url: '/company/department', data })
// 获取部门详情
export const getDeptInfo = (id) => request(`/company/department/${id}`)

// 更新部门
export const updateDept = (data) =>
  request({ method: 'put', url: `/company/department/${data.id}`, data })

// 删除部门
export const delDept = (id) => request({ method: 'delete', url: `/company/department/${id}` })
